<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
	uri="http://java.sun.com/jsf/core" prefix="f"%><%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>欢迎来到Enjoy聊天室!</title>
<link type="text/css" rel="stylesheet" href="../styles/style.css"></link>
</head>
<body>
<f:view>
<div class="mainbg">
	<div class="innerbg">
		<div class="table" style="width:460px">
		<div class="tableHead">
			<h:selectOneMenu style="float:right;" value="#{messageBean.friendId}" valueChangeListener="#{messageBean.chooseFriend}" immediate="true" onchange="submit()" id="friendList">
				<f:selectItem itemValue="-1" itemLabel="用户列表"></f:selectItem>
				<f:selectItems value="#{messageBean.allUsers}"></f:selectItems>
			</h:selectOneMenu>
		</div>
		<h:form id="messageForm">
			<table>
				<tr>
					<td>
						<div style="overflow:scroll;width:450px;height:200px;" id="messageBox"></div>
					</td>
				</tr>
				<tr>
					<td><h:inputTextarea cols="50" rows="5" value="#{message.content}" id="sendBox" style="width:450px;"></h:inputTextarea><br/></td>
				</tr>
				<tr>
					<td>
						<input type="button" onclick="sendMessage()" value="发送" style="float:right;margin-right:5px;"></input>
					</td>
				</tr>
			</table>
					<h:inputText value="#{member.userId}" style="display:none;" id="userIdBox" ></h:inputText>
		
				</h:form>
		</div>
		</div>
		</div>
</f:view>
	<script type="text/javascript" src="../scripts/scripts.js" charset="utf-8"></script>
</body>
</html>